<?php

class Registration Extends MY_Controller
{
	public function __construct()
	{
		parent::__construct();
		$this->page_auth->secure_page();
		$this->load->library('hs');
		$this->view_data['system_message'] = $this->_msg();
		
	}
	
	public function register($hash = '')
	{
		$x = $this->hs->decrypt($hash);
		if($x)
		{
			$id = $x[0];
			$year = $x[1].' - '.$x[2];
			
			$this->view_data['for_year'] = $year;
			$this->view_data['hash'] = $x;
			$this->view_data['year_id'] = $id;
			
			if($this->input->post('confirm_registration'))
			{
				$this->_msg('s','Registration Confirmed, Choose a Payment Plan','registration/choose_payment_plan/'.$hash);
			}
			
			
		}else{
			show_404();
		}
	}
	
	public function choose_payment_plan($hash = '')
	{
		$x = $this->hs->decrypt($hash);
		if($x)
		{
			$id = $x[0];
			$year = $x[1].' - '.$x[2];
			
			$this->view_data['for_year'] = $year;
			$this->view_data['hash'] = $x;
			$this->view_data['year_id'] = $id;
			
			if($this->input->post('save_payment_plan'))
			{
				$this->_msg('s','Payment Plan is set, Choose Section and Schedule','registration/choose_section/'.$hash);
			}
		
		}else{
			show_404();
		}
	}
	
	
	
	public function choose_section($hash = '')
	{
		$x = $this->hs->decrypt($hash);
		if($x)
		{
			$id = $x[0];
			$year = $x[1].' - '.$x[2];
			
			$this->view_data['for_year'] = $year;
			$this->view_data['hash'] = $x;
			$this->view_data['year_id'] = $id;
			
			if($this->input->post('save_payment_plan'))
			{
				$this->_msg('s','Payment Plan is set, Choose Section and Schedule','registration/choose_section/'.$hash);
			}
		
		}else{
			show_404();
		}
	}

	public function finalize()
	{
	
	
	
	
	
	}
}